﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BesAsm.Stormwater.Swmm5Results
{
  public class SimulationResults
  {
    private int _catchmentCount;
    public int CatchmentCount { get { return _catchmentCount; } internal set { _catchmentCount = value; } }
    private int _nodeCount;
    public int NodeCount { get { return _nodeCount; } internal set { _nodeCount = value; } }
    private int _linkCount;
    public int LinkCount { get { return _linkCount; } internal set { _linkCount = value; } }
    private int _pollutantCount;
    public int PollutantCount { get { return _pollutantCount; } internal set { _pollutantCount = value; } }
    public DateTime StartDate { get; internal set; }
    public DateTime EndDate { get; internal set; }
    public TimeSpan Interval { get; internal set; }
    public string File { get; private set; }
    public string Name { get; private set; }

    private ResultVariablesCollection<CatchmentVariables> _catchments;
    public ResultVariablesCollection<CatchmentVariables> Catchments { get { return _catchments; } }
    private ResultVariablesCollection<LinkVariables> _links;
    public ResultVariablesCollection<LinkVariables> Links { get { return _links; } }
    private ResultVariablesCollection<NodeVariables> _nodes;
    public ResultVariablesCollection<NodeVariables> Nodes { get { return _nodes; } }

    private int _resultsCount;
    public int ResultsCount { get { return _resultsCount; } internal set { _resultsCount = value; } }

    private OutputFileReader _reader;

    public SimulationResults(OutputFileReader reader)
    {
      _reader = reader;
      File = reader.File;
      Name = System.IO.Path.GetFileNameWithoutExtension(File);

      _catchments = new ResultVariablesCollection<CatchmentVariables>();
      _links = new ResultVariablesCollection<LinkVariables>();
      _nodes = new ResultVariablesCollection<NodeVariables>();
    }

  }
}
